<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('查询企业信息')" />
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="queryEnterpriseInfo-form">
                <div class="select-list">
                    <ul>
                        <li>
                            企业关键字：
                            <input name="keyword">
                        </li>
                        <li>
                            最大查询数量：
                            <select name="maxCount" style="width: 60px;" >
                                <option th:value="20" th:text="20" ></option>
                                <option th:value="40" th:text="40" ></option>
                                <option th:value="60" th:text="60" ></option>
                                <option th:value="80" th:text="80" ></option>
                                <option th:value="100" th:text="100" ></option>
                            </select>
                        </li>
                        <li>
                            数据来源：
                            <select name="queryType" style="width: 100px;" >
                                <option th:each="m : ${queryTypes}" th:value="${m.value}" th:text="${m.desc}" ></option>
                            </select>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;查询</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="resetForm()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">

    var prefix = ctx + "queryData";

    $(function() {
        var options = {
            url: prefix + "/queryEnterpriseInfo",
            modalName: "查询企业信息",
            pagination: false,
            firstLoad: false,
            columns: [
                {
                    title: '序号',
                    formatter: function (value, row, index) {
                        return index+1;
                    }
                },
                {
                    field: 'enterpriseName',
                    title: '企业名称'
                },
                {
                    field: 'enterpriseCreditCode',
                    title: '统一社会信用代码'
                },
                {
                    field: 'enterpriseRegisterNo',
                    title: '工商注册号/登记证号'
                }]
        };
        $.table.init(options);

        $(".no-records-found > td").text("首次加载页面请手动点击[生成]按钮");
    });

    function resetForm() {
        $("#queryEnterpriseInfo-form").reset();
    }

</script>
</body>
</html>
